import request from '@/utils/request'


//获取是否存在没有处理的库存异常
export function getInventoryIsResolved(query) {
  return request({
    url: '/api/inventory/isResolved',
    method: 'get',
    params: query
  });
}

// 获取NCC库存列表
export function getInventoryGetInventoryList(query) {
  return request({
    url: '/api/inventory/getInventoryList',
    method: 'get',
    params: query
  });
}

// 更新异常库存处理状态
export function createInventoryTaskId(taskId, data) {
  return request({
    url: `/api/inventory/${taskId}`,
    method: 'post',
    data: data
  });
}

// 获取库存比对任务列表
export function getInventoryAbnormalInventory(query) {
  return request({
    url: '/api/inventory/abnormalInventory',
    method: 'get',
    params: query
  });
}

// 保存库存数据
export function createInventorySaveInventoryData(warehouseId, data) {
  return request({
    url: `/api/inventory/saveInventoryData/${warehouseId}`,
    method: 'post',
    data: data
  });
}

// 手动比对数据
export function createInventoryManualSyncing(warehouseId, data) {
  return request({
    url: `/api/inventory/manualSyncing/${warehouseId}`,
    method: 'post',
    data: data
  });
}

// 导出库存异常数据
export function createInventoryExport(ids, data) {
  return request({
    url: `/api/inventory/export/${ids}`,
    method: 'post',
    data: data
  });
}

// 获取比对任务库存异常详情
export function getInventoryDiscrepancyDetail(query) {
  return request({
    url: '/api/inventory/getInventoryDiscrepancyDetail',
    method: 'get',
    params: query
  });
}






//冻结库存修改
export function updateOutboundLimit(query) {
  return request({
    url: '/wms/stoStock/updateOutboundLimit',
    method: 'put',
    data: query
  });
}
//仓库冻结
export function setOutboundLimit(query) {
  return request({
    url: '/wms/stoStock/setOutboundLimit',
    method: 'post',
    data: query
  });
}
//获取冻结状态
export function getStoStateInfo(query) {
  return request({
    url: '/wms/stoStock/getStoStateInfo',
    method: 'get',
    params: query
  });
}
//最新的状态改变
export function updateState(query) {
  return request({
    url: '/wms/stoStock/updateState',
    method: 'put',
    data: query
  });
}
//查看冻结明细
export function findLimitationInfo(query) {
  return request({
    url: '/wms/stoStockLimitation/findLimitationInfo',
    method: 'get',
    params: query
  });
}
//明细单据类型解冻
export function putBillsTypeEnableStatus(query) {
  return request({
    url: '/wms/stoStockLimitation/putBillsTypeEnableStatus',
    method: 'put',
    data: query
  });
}
//追溯码解冻操作
export function putBatchEnableStatus(query, data) {
  return request({
    url: '/wms/stoStockLimitation/putBatchEnableStatus',
    method: 'put',
    params: query,
    data: data
  });
}
//限制冻结类型
export function findTypeList(query) {
  return request({
    url: '/wms/stoStockLimitation/findTypeList',
    method: 'get',
    params: query
  });
}
//批号限制
export function findTableXXXSkuList(query) {
  return request({
    url: '/tableXXXSku/findTableXXXSkuList',
    method: 'get',
    params: query
  });
}
//限制单据类型
export function findTypeAllByName(query) {
  return request({
    url: '/basic/billsType/findTypeAllByName',
    method: 'get',
    params: query
  });
}
//库存盘点导出
export function skuQueryExportData(query) {
  return request({
    url: '/warehouse/skuQueryExportData',
    method: 'post',
    data: query
  });
}
//库存冻结按钮
export function freeze(query) {
  return request({
    url: '/wms/stoStock/freeze',
    method: 'post',
    data: query
  });
}
//出入库名明细
export function getWMSWarehouseDetail(query) {
  return request({
    url: '/warehouse/getWMSWarehouseDetail',
    method: 'get',
    params: query
  });
}
